/**
* \file	SymbolTable.h
* \author	Caio Arce Nishibe (caionishibe@gmail.com)
* \date	August, 2014
* \brief	Symbol table header.
*/

#ifndef __SYMBOL_TABLE_H
#define __SYMBOL_TABLE_H

#include "Common.h"
#include "Symbol.h"
#include <iostream>
#include <string>

using namespace std;


/**
* \brief	Symbol table.
* \author	Caio Arce Nishibe (caionishibe@gmail.com)
* \date	August, 2014
*/
class SymbolTable
{
public:
	/**
	 * \brief pointer to the first symbol in the table
	 */
	Symbol *table;
	/**
	 * \brief constructor
	 */
	SymbolTable();
	/**
	 * \brief destructor
	 */
	~SymbolTable();
	/**
	 * \brief insert a symbol in the table.
	 * \details perform lookup before insertion.
	 * \param symbol pointer to the symbol that must be inserted
	 */
	Symbol* InsertSymbol(Symbol *symbol);
	/**
	 * \brief lookup for a symbol in the table
	 * \param name symbol name
	 * \param owner symbol owner (scope)
	 */
	Symbol* LookupSymbol(string name, string owner);
};



#endif